// src/api/log.js

import request from "@/utils/request";

/**
 * 获取系统操作日志列表
 * @param params {Object} 查询参数
 * @returns {Promise}
 */
export const getLogListService = (params) => {
    return request.get("/log", {params});
};

/**
 * 获取单条日志详情
 * @param id {Number|String} 日志ID
 * @returns {Promise}
 */
export const getLogDetailService = (id) => {
    return request.get(`/log/${id}`);
};

/**
 * 删除日志
 * @param id {Number|String} 日志ID
 * @returns {Promise}
 */
export const deleteLogService = (id) => {
    return request.delete(`/log/${id}`);
};

/**
 * 批量删除日志
 * @param ids {Array} 日志ID数组
 * @returns {Promise}
 */
export const deleteLogBatchService = (ids) => {
    return request.post('/log/batch', {ids})
};
